package com.ruoyi.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.CfOrderMapper;
import com.ruoyi.order.domain.CfOrder;
import com.ruoyi.order.service.ICfOrderService;

/**
 * 订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-13
 */
@Service
public class CfOrderServiceImpl implements ICfOrderService 
{
    @Autowired
    private CfOrderMapper cfOrderMapper;

    /**
     * 查询订单
     * 
     * @param orderId 订单主键
     * @return 订单
     */
    @Override
    public CfOrder selectCfOrderByOrderId(Long orderId)
    {
        return cfOrderMapper.selectCfOrderByOrderId(orderId);
    }

    /**
     * 查询订单列表
     * 
     * @param cfOrder 订单
     * @return 订单
     */
    @Override
    public List<CfOrder> selectCfOrderList(CfOrder cfOrder)
    {
        return cfOrderMapper.selectCfOrderList(cfOrder);
    }

    /**
     * 新增订单
     * 
     * @param cfOrder 订单
     * @return 结果
     */
    @Override
    public int insertCfOrder(CfOrder cfOrder)
    {
        return cfOrderMapper.insertCfOrder(cfOrder);
    }

    /**
     * 修改订单
     * 
     * @param cfOrder 订单
     * @return 结果
     */
    @Override
    public int updateCfOrder(CfOrder cfOrder)
    {
        return cfOrderMapper.updateCfOrder(cfOrder);
    }

    /**
     * 批量删除订单
     * 
     * @param orderIds 需要删除的订单主键
     * @return 结果
     */
    @Override
    public int deleteCfOrderByOrderIds(Long[] orderIds)
    {
        return cfOrderMapper.deleteCfOrderByOrderIds(orderIds);
    }

    /**
     * 删除订单信息
     * 
     * @param orderId 订单主键
     * @return 结果
     */
    @Override
    public int deleteCfOrderByOrderId(Long orderId)
    {
        return cfOrderMapper.deleteCfOrderByOrderId(orderId);
    }

    @Override
    public List<CfOrder> selectCfOrderListByDate(CfOrder cfOrder) {
        return cfOrderMapper.selectCfOrderListByDate(cfOrder);
    }


    /**
     * 查询订单的类别
     * @return
     */
    @Override
    public List selectCfOrderListByCategory() {
        return cfOrderMapper.selectCfOrderListByCategory();
    }
}
